package com.wx.mall.operate.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 优惠券表
 * </p>
 *
 * @author j
 * @since 2020-05-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("op_discount")
@ApiModel(value="Discount对象", description="优惠券表")
public class Discount implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
      @TableId(value = "dis_id", type = IdType.AUTO)
    private Integer disId;

    @ApiModelProperty(value = "优惠券名称")
    private String disName;

    @ApiModelProperty(value = "优惠券类型:0为注册赠券,1为全场赠券,2为会员赠券,3购物赠券")
    private Integer disType;

    @ApiModelProperty(value = "平台: 1 全平台,2PC端,3移动端")
    private Integer platform;

    @ApiModelProperty(value = "发行总优惠券数:0为无限制")
    private Integer disNumber;

    @ApiModelProperty(value = "库存量:0为无限制  ")
    private Integer disStock;

    @ApiModelProperty(value = "面额")
    private Integer price;

    @ApiModelProperty(value = "每人限领张数:默认1张")
    private Integer disLimit;

    @ApiModelProperty(value = "使用条件:0为无限制")
    private Integer useCondition;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "有效期:")
    private Date endTime;

    @ApiModelProperty(value = "领取后,有效天数,默认7天")
    private Integer endDay;

    @ApiModelProperty(value = "状态:0未过期,1为已过期")
    private Integer state;

    @ApiModelProperty(value = "备注")
    private String  disRemark;

    @ApiModelProperty(value = "删除:0删1现")
    private Integer isDelete;

    @ApiModelProperty(value = "是否全场通用0不通用,1通用")
    private Integer allUse;
}
